//
// Created by jsjxsy on 2022/6/28.
//
#include <stdio.h>
#include <stddef.h>
#include <stdalign.h>
struct address {
  char name[50];
  char street[50];
  int phone;
};

int main() {
  size_t name_position = offsetof(struct address, name);
  printf("address 结构中的 name 偏移 = %lu 字节。\n",name_position);

  printf("address 结构中的 street 偏移 = %lu 字节。\n",
         offsetof(struct address, street));

  printf("address 结构中的 phone 偏移 = %lu 字节。\n",
         offsetof(struct address, phone));

  printf("%zu\n", alignof(char));
  size_t n = 123;
  printf("%zu\n",alignof(n));
  return (0);
}